# Generated by Django 4.2.13 on 2024-06-14 10:52

import django.contrib.auth.models
import django.contrib.auth.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='Specialization',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('specialization', models.TextField(verbose_name='Специализация')),
            ],
            options={
                'db_table': 'specialization',
            },
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('first_name', models.CharField(db_column='firstname', max_length=40, verbose_name='Имя')),
                ('second_name', models.CharField(blank=True, db_column='secondname', max_length=40, null=True, verbose_name='Отчество')),
                ('last_name', models.CharField(db_column='lastname', max_length=40, verbose_name='Фамилия')),
                ('phone', models.CharField(blank=True, max_length=20, null=True, verbose_name='Телефон')),
                ('position', models.CharField(blank=True, max_length=50, null=True, verbose_name='Должность')),
                ('image', models.ImageField(blank=True, null=True, upload_to='images/', verbose_name='Фото')),
                ('first_login', models.BooleanField(default=False, verbose_name='Входил ли пользователь после смены пароля')),
                ('user_modify', models.CharField(blank=True, null=True, verbose_name='Логин изменившего учетную запись')),
                ('user_create', models.CharField(blank=True, null=True, verbose_name='Логин создавшего запись')),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('update_date', models.DateTimeField(auto_now=True, db_column='modify_date')),
                ('employment_fraction', models.DecimalField(blank=True, choices=[(0.1, '0.1'), (0.25, '0.25'), (0.5, '0.5'), (0.75, '0.75'), (1.0, '1.0')], decimal_places=2, default=1.0, max_digits=3, null=True, verbose_name='Ставка')),
                ('additional_specializations', models.ManyToManyField(blank=True, related_name='additional_specialization_users', to='users.specialization', verbose_name='Дополнительные специализации')),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.group', verbose_name='groups')),
                ('main_specialization', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='main_specialization_users', to='users.specialization', verbose_name='Основная специализация')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'Пользователь',
                'verbose_name_plural': 'Пользователи',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
    ]
